<?php

namespace App\Listeners;

use App\Events\OrderRefundedEvent;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Notifications\ShipmentNotification;

class OrderRefundedListener
{
    public function handle(OrderRefundedEvent $event)
    {
    	$message = "亲，很抱歉您购买的商品由于疫情原因暂时无法发货，货款已原路返回，给您带来的不便我们深表歉意！";
	    $event->refund->user->notify(new ShipmentNotification($message, $event->refund->order));
    }
}
